Matthias Clasen [Wed, 18 Oct 2017 15:20:53 +0000 (17:20 +0200)]
Update expected output of statusbar a11y test
Matthias Clasen [Wed, 18 Oct 2017 15:20:14 +0000 (17:20 +0200)]
Fix GtkStatusbarAccessible
GtkStatusbar is no longer a container, so GtkStatusbarAccessible
can no longer be a container accessible.
Matthias Clasen [Wed, 18 Oct 2017 00:53:07 +0000 (08:53 +0800)]
gtk4-demo: Stop using pixdata resources
This does not really help, and pixdata is deprecated.
Matthias Clasen [Wed, 18 Oct 2017 00:53:49 +0000 (08:53 +0800)]
gtk: Stop using pixdata resources
It does not really help, and pixdata is deprecated.
Matthias Clasen [Tue, 17 Oct 2017 09:54:02 +0000 (17:54 +0800)]
testsuite: Add missing files
Matthias Clasen [Tue, 17 Oct 2017 09:35:28 +0000 (17:35 +0800)]
testsuite: Use the cairo renderer for now
Matthias Clasen [Tue, 17 Oct 2017 09:02:00 +0000 (17:02 +0800)]
Distribute all test files
Matthias Clasen [Sun, 15 Oct 2017 07:33:43 +0000 (15:33 +0800)]
Updates
Matthias Clasen [Sun, 15 Oct 2017 03:52:03 +0000 (11:52 +0800)]
Update all css parser tests
I have not tracked down in detail where all these changes originate,
this commit just gets things back to working again.
Matthias Clasen [Sun, 15 Oct 2017 03:48:51 +0000 (11:48 +0800)]
Drop widget style property test
Matthias Clasen [Sun, 15 Oct 2017 02:20:48 +0000 (10:20 +0800)]
Stop testing deprecated css features
Timm Bäder [Tue, 17 Oct 2017 06:49:06 +0000 (08:49 +0200)]
emojichooser: Plug memory leak
Julian Sparber [Mon, 7 Aug 2017 21:33:42 +0000 (23:33 +0200)]
icon-browser: Add scalable icons to icon detail modal window
When making mockups for GNOME apps in Inkscape, looking for symbolic
icons is a common task. Searching for icons in the file system is clumsy,
and icon-browser provides a much better interface for finding them.
However, currently there is no way to insert the symbolic icons as SVG
directly from icon-browser, so right now it is only useful for finding
the name.
This patch adds a sixth column to the modal window that appears when
clicking a symbolic icon. The icon in this column is labeled "scalable",
and dragging it onto another window results in the vector icon URI being
inserted.
This enables a much simpler workflow when designing with symbolic icons.
https://bugzilla.gnome.org/show_bug.cgi?id=778930
Carlos Garnacho [Thu, 5 Oct 2017 23:06:03 +0000 (01:06 +0200)]
gdk/wayland: Avoid idempotent wl_subsurface.set_position calls
These may not result on wl_surface.frame callbacks, yet we do trigger
a frame clock tick that would get stuck on the lack of such callback.
https://bugzilla.gnome.org/show_bug.cgi?id=784314
Aurimas Černius [Sun, 15 Oct 2017 18:30:15 +0000 (21:30 +0300)]
Updated Lithuanian translation
Daniel Boles [Sun, 15 Oct 2017 11:55:22 +0000 (12:55 +0100)]
a11y/entry: Fixups for previous commit
We still declare all variables at the start of the block.
Also, we can use the fast private _gtk_widget_get_allocation().
https://bugzilla.gnome.org/show_bug.cgi?id=784509
Samuel Thibault [Thu, 5 Oct 2017 15:49:00 +0000 (15:49 +0000)]
a11y/entry: Fix text coords not adjusted for alloc
What is missing is the "allocation" part of x/y coordinates. Since
gtk_entry_realize doesn't call gtk_widget_set_window(priv->text_area),
the coordinates returned by gdk_window_get_origin don't include it.
This patch fixes this.
https://bugzilla.gnome.org/show_bug.cgi?id=784509
Daniel Boles [Sat, 14 Oct 2017 17:45:20 +0000 (18:45 +0100)]
Range: Fix inverted horizontal scroll wheel events
Bug 737175 aimed to ensure that scrolling up on a horizontal range would
result in its value increasing, as that’s what users intuitively expect.
However, its commit
416c370da1d2eff2458e4a0c5b8e504cd8061559 meant that,
if the event gives scroll deltas, we inverted our delta unconditionally.
So it broke horizontal scrolling: scrolling left moved the slider right…
We must only invert if using dy as delta. dx already has the right sign,
so inverting it was wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=788905
Timm Bäder [Sat, 14 Oct 2017 10:00:19 +0000 (12:00 +0200)]
gtkcssimagefallback: Implement equals()
The default equals() implementation in gtkcssimage.c just returns FALSE.
This avoids needless redraws, e.g. for disabled switches.
Timm Bäder [Sat, 14 Oct 2017 14:44:54 +0000 (16:44 +0200)]
listboxrow: Remove measure() and size_allocate() impls
GtkListBoxRow is a GtkBin which already does this.
Timm Bäder [Sat, 14 Oct 2017 12:58:53 +0000 (14:58 +0200)]
css: Add GTK_CSS_AFFECTS_ICON_SIZE
And use it in GtkIconHelper. This way, we can avoid resizes when e.g.
the fg color of a symbolic icon changes.
Timm Bäder [Sat, 14 Oct 2017 12:58:13 +0000 (14:58 +0200)]
iconhelper: Short-circuit clear() if it's cleared already
Timm Bäder [Sat, 14 Oct 2017 10:45:17 +0000 (12:45 +0200)]
popover: Explicitly call queue_allocate in tick callback
_gtk_window_set_popover_position is begin called in size-allocate.
Timm Bäder [Sat, 14 Oct 2017 10:41:45 +0000 (12:41 +0200)]
window: Remove widget parameter from popover_size_allocate
We already get that via the popover parameter.
Timm Bäder [Sat, 14 Oct 2017 06:12:05 +0000 (08:12 +0200)]
widget: Whitespace fix
Fallout from one of my earlier commits so not changing ownership here.
Timm Bäder [Sat, 14 Oct 2017 05:37:06 +0000 (07:37 +0200)]
widget: Only check display debug flags if the global ones are set
The gtk_widget_get_display call in this if statement is showing up in
profiles. It ends up walking up the hierarchy to the toplevel to get its
GdkScreen, etc. so it is relatively costly. Avoid that call in most
cases by first checking if the RESIZE debugging is enabled for any of
the displays and only then checking if it is enabled for the widget's
display.
Timm Bäder [Sat, 14 Oct 2017 05:25:19 +0000 (07:25 +0200)]
widget: Avoid some type checks when invalidating window
Use the private _gtk_widget_get_has_window instead of the public version
Timm Bäder [Fri, 13 Oct 2017 10:47:09 +0000 (12:47 +0200)]
adjustment: Drop priv pointer
Daniel Boles [Thu, 12 Oct 2017 13:05:09 +0000 (14:05 +0100)]
Fixed: If can’t add child, don’t add to child info
If the call to set_parent() failed, we were still adding the child to
the internal list of children, despite that it was not really added.
That meant we could later try to do invalid stuff with that non-child.
Fix that by asserting and giving up if the child that the user is
attempting to add is already parented.
https://bugzilla.gnome.org/show_bug.cgi?id=701296
Daniel Boles [Fri, 13 Oct 2017 08:49:34 +0000 (09:49 +0100)]
Fixed: Don’t dereference before typechecking
Daniel Boles [Thu, 12 Oct 2017 23:24:22 +0000 (00:24 +0100)]
icon-browser: Stop repeating folder-documents too
Daniel Boles [Thu, 12 Oct 2017 18:40:45 +0000 (19:40 +0100)]
StyleContext: Add CSS snippet language comments
The language is useful for parsing tools, such as that of gtkmm, which
otherwise assumes these are C snippets and elides them from its
generated documentation.
Carlos Garnacho [Thu, 12 Oct 2017 16:28:35 +0000 (18:28 +0200)]
testsuite: Make all gesture test touches happen in the middle of the window
The event coordinates are (so far) irrelevant to what we are testing here,
just make all events happen in the middle of the window in order to ensure
all widgets receive it. More importantly, avoid using fixed pixel distances,
since we don't get guarantees about window sizes.
Fixes the gestures testsuite on X11.
Timm Bäder [Thu, 12 Oct 2017 14:09:31 +0000 (16:09 +0200)]
testsuite: Updated expected GtkSwitch nodes
The slider comes last now.
Timm Bäder [Thu, 12 Oct 2017 11:18:07 +0000 (13:18 +0200)]
css: Replace _AFFECTS_TEXT with _TEXT_SIZE and _TEXT_CLIP
It was used to mark css properties that affect widgets with text, but it
caused unnecessary invalidations. E.g. 'color' was marked as
AFFECTS_TEXT but changing just the color of a label should not
automatically queue a resize, which is what the code in
gtk_widget_real_style_updated does.
Replace this flag with GTK_CSS_AFFECTS_TEXT_SIZE and
GTK_CSS_AFFECTS_TEXT_CLIP, which GtkWidget can use only if the widget
actually has text.
Timm Bäder [Thu, 12 Oct 2017 10:34:37 +0000 (12:34 +0200)]
csstypesprivate: Remove AFFECTS_PANGO_LAYOUT mention
Doesn't even exist!
Timm Bäder [Thu, 12 Oct 2017 09:46:25 +0000 (11:46 +0200)]
GtkCssStyleChange: Only print values that really changed
Timm Bäder [Thu, 12 Oct 2017 08:41:56 +0000 (10:41 +0200)]
widget: Use blue for resize debugging
Red is already taken by drawing.
Timm Bäder [Wed, 11 Oct 2017 11:26:59 +0000 (13:26 +0200)]
glarea: Make the code snippet compile
Timm Bäder [Wed, 11 Oct 2017 11:20:15 +0000 (13:20 +0200)]
drawingarea: Fix code snippet
Remove state parameter to gtk_style_context_get_color
Timm Bäder [Wed, 11 Oct 2017 11:16:23 +0000 (13:16 +0200)]
window: Make code snippets compile
Fix the wrong signature of a size_allocate signal handler
Carlos Garnacho [Thu, 12 Oct 2017 12:25:53 +0000 (14:25 +0200)]
testsuite: Update gestures test to pointer emulation removal
Now all widgets are mandated to handle the real thing, which means no
pointer events are emulated for the pointer emulating touch. The output
of these tests relied on this fact, so update to the tests handling real
touch events.
Carlos Garnacho [Thu, 12 Oct 2017 12:22:04 +0000 (14:22 +0200)]
testsuite: Fix gesture test inconsistencies due to legacy event handling
Legacy GtkWidget vmethods are now handled on an event controller, which
due to being the very first controller added to every widget, runs in
a different order than the previously hardcoded.
Probably testing legacy events is not really futurible, specially after
we stop installing this legacy controller by default. I'll leave the
choice to remove these specific tests for later though.
Carlos Garnacho [Thu, 12 Oct 2017 12:19:35 +0000 (14:19 +0200)]
gtkwidget: Check return value before running bubble phase
If the target widget gets the event consumed on the target phase,
we should not attempt to bubble up, not even within the same widget.
Carlos Garnacho [Thu, 12 Oct 2017 12:18:12 +0000 (14:18 +0200)]
gtkwidget: Lookup target widget when propagating emulated pressed
After a gesture first claims, and later rejects a touch sequence,
a press event will be propagated further along. However propagation
got messed up since we only emitted as far as the toplevel.
Matthias Clasen [Thu, 12 Oct 2017 09:23:35 +0000 (17:23 +0800)]
Update the css style test
The new font-variant support affected the output here.
Matthias Clasen [Thu, 12 Oct 2017 08:05:32 +0000 (16:05 +0800)]
Make css node and style tests run
Just like the previous commit, we need to set G_TEST_SRCDIR.
Matthias Clasen [Thu, 12 Oct 2017 07:58:05 +0000 (15:58 +0800)]
Make css parser tests run
We need to set G_TEST_SRCDIR and friends for this to do anything.
Setting it reveals that a bunch of the tests are broken.
Matthias Clasen [Thu, 12 Oct 2017 01:09:21 +0000 (20:09 -0500)]
Update some a11y tests
Matthias Clasen [Thu, 12 Oct 2017 00:59:07 +0000 (19:59 -0500)]
Fix a typo
Matthias Clasen [Thu, 12 Oct 2017 00:33:43 +0000 (19:33 -0500)]
testsuite: cosmetics
Put all tests in a suite, and order them in a nicer way.
This makes the test output look better.
Daniel Boles [Wed, 11 Oct 2017 21:35:31 +0000 (22:35 +0100)]
Settings: Mention Shift+primary click on Range too
This already existed, and since this doc blurb is already inflating
dramatically, what’s another half a line?
Daniel Boles [Wed, 11 Oct 2017 20:23:20 +0000 (21:23 +0100)]
Settings: Reflect resurrected middleclick in Range
and while here, make the explanation more explicit as to which values do
what, & use general Range terminology instead of focussing on scrollbars
https://bugzilla.gnome.org/show_bug.cgi?id=787669
Daniel Boles [Wed, 11 Oct 2017 20:12:33 +0000 (21:12 +0100)]
ToggleButton: Actually show buttons in new snippet
Also, create a Window, instead of a Dialog without a transient parent,
which is (noisily) discouraged. Then s/content_area/box/g to match.
Emmanuele Bassi [Tue, 10 Oct 2017 09:19:53 +0000 (10:19 +0100)]
docs: Clarify the visibility of buttons in GtkStackSwitcher
If a page in the GtkStack is not visible, then the GtkStackSwitcher
won't show a button for it.
Matthias Clasen [Wed, 11 Oct 2017 19:07:53 +0000 (14:07 -0500)]
range: Bring back middle clicks
It does not hurt us to keep middle clicks doing the same
as shift-primary clicks. This makes the transition from gtk2
less painful in terms of muscle memory.
https://bugzilla.gnome.org/show_bug.cgi?id=787669
Philip Withnall [Tue, 10 Oct 2017 17:29:36 +0000 (18:29 +0100)]
gtktextview: Add a missing g_assert_not_reached() for switch default
Clarifies the code and helps catch invalid enum values before they
propagate further. Also add a comment about why two seemingly legitimate
values are not handled there (they’re handled higher up in the file).
Coverity CID:
1457700
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=788787
Timm Bäder [Wed, 11 Oct 2017 11:01:27 +0000 (13:01 +0200)]
bindings: Fix code snippet
Just use a more realistic example, adapted from gtklistbox.c
Timm Bäder [Wed, 11 Oct 2017 10:56:42 +0000 (12:56 +0200)]
accellabel: Fix code snippet
Timm Bäder [Wed, 11 Oct 2017 10:55:01 +0000 (12:55 +0200)]
aboutdialog: Fix code snippets
Define all variables and fix a missing comma in the first
gtk_show_about_dialog call.
Timm Bäder [Wed, 11 Oct 2017 10:41:47 +0000 (12:41 +0200)]
applicationwindow: Fix code sample
Declare all variables, use proper GtkApplication constructor and the
right GTK_APPLICATION() cast for gtk_application* API.
Timm Bäder [Wed, 11 Oct 2017 10:35:55 +0000 (12:35 +0200)]
togglebutton: Fix code snippet
Remove gtk_box_pack_start usage, gtk_dialog_get_content_area, fix wrong
gtk_dialog_new parameters and actually add a output_state callback.
Timm Bäder [Wed, 11 Oct 2017 10:21:20 +0000 (12:21 +0200)]
gtksettings: Fix code snippet
gtk_init does not take any arguments anymore and
GTK_TYPE_IMAGE_MENU_ITEM is gone.
Timm Bäder [Wed, 11 Oct 2017 10:18:22 +0000 (12:18 +0200)]
label: Make all code snippets properly compile
Timm Bäder [Wed, 11 Oct 2017 09:08:46 +0000 (11:08 +0200)]
accellabel: Document new API
Timm Bäder [Wed, 11 Oct 2017 08:55:20 +0000 (10:55 +0200)]
conview: Fix rubberband coordinates when scrolling
Timm Bäder [Wed, 11 Oct 2017 08:50:03 +0000 (10:50 +0200)]
iconview: Remove double-MAX when updating rubberband
Timm Bäder [Wed, 11 Oct 2017 07:24:35 +0000 (09:24 +0200)]
rendericon: Fix texture transformation
Use the one from snapshot_icon, which works.
Timm Bäder [Wed, 11 Oct 2017 07:03:40 +0000 (09:03 +0200)]
modelmenuitem: Fix icon/label alignment
gtk_box_pack_end will put the label child at the right side of the label
(in LTR orientation), but we want it left, directly next to the icon.
Also remove the spacing from the box child as this is a theme thing.
Timm Bäder [Wed, 11 Oct 2017 06:49:44 +0000 (08:49 +0200)]
grid: Only pass baselines to children that request it
Timm Bäder [Wed, 11 Oct 2017 06:25:20 +0000 (08:25 +0200)]
grid: Simplify allocating children
allocation->x and allocation->y are always 0. MAX'ing width/height with
1 is also wrong now since 0 is a valid width/height for widgets.
Timm Bäder [Wed, 11 Oct 2017 06:06:33 +0000 (08:06 +0200)]
eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps
The > 1 meant it only emits the signal for -2/+2 steps.
Timm Bäder [Wed, 11 Oct 2017 06:05:52 +0000 (08:05 +0200)]
tests: Add testgridbaseline
Which shows that GtkGrid currently computes baselines for all rows even
though not all of them might request a baseline.
Timm Bäder [Tue, 10 Oct 2017 19:54:53 +0000 (21:54 +0200)]
cssnode: Delay getting the parent style until we need it
There's an early return before.
Look at all those saved cycles.
Matthias Clasen [Tue, 10 Oct 2017 23:40:29 +0000 (19:40 -0400)]
Don't set child position in a ui file
It is not necessary, and causes assertions in some of
our tests.
Benjamin Otte [Tue, 10 Oct 2017 19:00:46 +0000 (21:00 +0200)]
cssnode: Don't put wrong styles in the style cache
~Company ╡ so TL;DR: we put the static style in the cache, but then
⤷ ╡ compute a child style from the animated style in the cache
⤷ ╡ and we put the child style also in the cache (because
⤷ ╡ it's not animated)
⤷ ╡ then we run the animation, but reuse the cache every time
⤷ ╡ for both child and parent
⤷ ╡ so after the animation is done, we end up with a cache that
⤷ ╡ has the correct static style for the parent but an
⤷ ╡ incorrect static style for the child
⤷ ╡ because that static style was computed from the
⤷ ╡ initial animated style
This fixes https://bugzilla.gnome.org/show_bug.cgi?id=763517
Timm Bäder [Tue, 10 Oct 2017 18:59:57 +0000 (20:59 +0200)]
cssnodedeclaration: Add gtk_css_node_declaration_to_string
Timm Bäder [Tue, 10 Oct 2017 10:53:06 +0000 (12:53 +0200)]
build: Drop redundant workaround
This is fixed and we require a meson > 0.39 anyway.
Timm Bäder [Tue, 10 Oct 2017 07:07:34 +0000 (09:07 +0200)]
rendernode: Don't leak mem_surface
Timm Bäder [Mon, 9 Oct 2017 15:38:54 +0000 (17:38 +0200)]
Don't try to snapshot invisible icons
These spew criticals when width == 0 || height == 0.
Timm Bäder [Sun, 8 Oct 2017 18:15:39 +0000 (20:15 +0200)]
scalebutton: Fix comparison for empty icon list
Timm Bäder [Sun, 8 Oct 2017 15:42:41 +0000 (17:42 +0200)]
stylecontext: Fix doc comment
There is no @cr here anymore.
Timm Bäder [Sun, 8 Oct 2017 15:38:38 +0000 (17:38 +0200)]
GdkDisplay: Add a private _emit_opened
So we don't have to use the slower g_signal_emit_by_name in startup
paths.
Timm Bäder [Sun, 8 Oct 2017 08:49:28 +0000 (10:49 +0200)]
textdisplay: Remove widgets parameter from gtk_text_layout_draw
All calls in gtk+ were passing NULL anyway.
Timm Bäder [Sun, 8 Oct 2017 08:40:48 +0000 (10:40 +0200)]
grid: Drop priv pointer
Matthias Clasen [Tue, 10 Oct 2017 04:18:21 +0000 (00:18 -0400)]
Reshuffle the css tests a bit
Matthias Clasen [Tue, 10 Oct 2017 04:16:10 +0000 (00:16 -0400)]
Reshuffle the a11y tests a bit
Matthias Clasen [Tue, 10 Oct 2017 04:14:48 +0000 (00:14 -0400)]
Add an install-tests option
Use this to enable or disable installed tests.
Matthias Clasen [Tue, 10 Oct 2017 03:35:19 +0000 (23:35 -0400)]
Install css api test again
Matthias Clasen [Tue, 10 Oct 2017 03:32:13 +0000 (23:32 -0400)]
Install css style tests again
Reinstate the installed tests for css style.
Matthias Clasen [Tue, 10 Oct 2017 03:29:10 +0000 (23:29 -0400)]
Install css parser tests again
Reinstate the installed tests for the css parser.
Matthias Clasen [Tue, 10 Oct 2017 03:24:23 +0000 (23:24 -0400)]
Install css node tests again
Reinstate the installed tests for css nodes.
Matthias Clasen [Tue, 10 Oct 2017 01:58:50 +0000 (21:58 -0400)]
Fix docs build
this include file can't be found, so just do without it.
Matthias Clasen [Mon, 9 Oct 2017 23:35:40 +0000 (19:35 -0400)]
Towards a working docs build
Add back images, content_files and expand_content files.
Anders Jonsson [Mon, 9 Oct 2017 23:19:22 +0000 (23:19 +0000)]
Update Swedish translation
Matthias Clasen [Mon, 9 Oct 2017 23:06:06 +0000 (19:06 -0400)]
Towards a working docs build
Pass mode: 'none' so escaping of <> in doc comments works.
Marek Cernocky [Mon, 9 Oct 2017 19:32:02 +0000 (21:32 +0200)]
Updated Czech translation
Matej Urbančič [Mon, 9 Oct 2017 18:54:24 +0000 (20:54 +0200)]
Updated Slovenian translation
Piotr Drąg [Mon, 9 Oct 2017 18:42:22 +0000 (20:42 +0200)]
Update Polish translation
Piotr Drąg [Sat, 7 Oct 2017 23:05:22 +0000 (01:05 +0200)]
gdk: Translate some more key names
These are used in the Keyboard panel of GNOME Settings.
https://bugzilla.gnome.org/show_bug.cgi?id=787866